import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);
export default new Router({
  // mode: 'history',
  routes: [{
    path: '/',
    redirect: '/login'
  },
  {
    path: '/Home',
    component: resolve => require(['../components/common/Home.vue'], resolve),
    children: [{
      path: '/',
      component: resolve => require(['../components/page/system/user.vue'], resolve)
    },
    //*******************系统管理****************************//
    { //菜单管理
      path: '/menu',
      name: 'menu',
      component: resolve => require(['../components/page/system/menu.vue'], resolve),
      meta: {
        auth: true,
        title: '菜单管理'
      }
    },
    //角色管理
    {
      path: '/role',
      name: 'role',
      component: resolve => require(['../components/page/system/role.vue'], resolve),
      meta: {
        auth: true,
        title: '角色管理'
      }
    },
    //地区管理
    {
      path: '/region',
      name: 'region',
      component: resolve => require(['../components/page/system/region.vue'], resolve),
      meta: {
        auth: true,
        title: '地区管理'
      }
    },
    //用户管理
    {
      path: '/user',
      name: 'user',
      component: resolve => require(['../components/page/system/user.vue'], resolve),
      meta: {
        auth: true,
        title: '用户管理'
      }
    },
    //系统管理----数据字典
    {
      path: '/data-dict',
      name: 'data-dict',
      component: resolve => require(['../components/page/system/data.vue'], resolve),
      meta: {
        auth: true,
        title: '数据字典'
      }
    },
    //政务百科----数据字典

    //日志管理
    {
      path: '/log',
      name: 'log',
      component: resolve => require(['../components/page/system/log.vue'], resolve),
      meta: {
        auth: true,
        title: '日志管理'
      }
    },
    //机构管理
    {
      path: '/mechanism',
      name: 'mechanism',
      component: resolve => require(['../components/page/system/mechanism.vue'], resolve),
      meta: {
        auth: true,
        title: '机构管理'
      }
    },

    /**************事项梳理*************/
    {
      path: '/clopedia/matterIndex',
      name: 'matterIndex',
      component: resolve => require(['../components/page/clopedia/matter/matterIndex.vue'], resolve),
      meta: {
        auth: true,
        title: '事项梳理'
      }
    },
    /**************事项内容*************/
    {
      path: '/clopedia/matterDetail',
      name: 'matterDetail',
      component: resolve => require(['../components/page/clopedia/matter/matterDetail.vue'], resolve),
      meta: {
        auth: true,
        title: '事项内容'
      }
    },

    /**************数据应用：业务系统*************/
    {
      path: '/clopedia/businessIndex',
      name: 'businessIndex',
      component: resolve => require(['../components/page/clopedia/dataApply/business/businessIndex.vue'], resolve),
      meta: {
        auth: true,
        title: '业务系统'
      }
    },
    {
      path: '/clopedia/businessAdd',
      name: 'businessIndex',
      component: resolve => require(['../components/page/clopedia/dataApply/business/businessAdd.vue'], resolve),
      meta: {
        auth: true,
        title: '业务系统添加'
      }
    },
    /**************数据应用：导出中心*************/
    {
      path: '/clopedia/exportIndex',
      name: 'exportIndex',
      component: resolve => require(['../components/page/clopedia/dataApply/exportCenter/exportIndex.vue'], resolve),
      meta: {
        auth: true,
        title: '导出中心'
      }
    },
    /**************服务应用：主题应用*************/
    {
      path: '/clopedia/themeIndex',
      name: 'themeIndex',
      component: resolve => require(['../components/page/clopedia/service/theme/themeIndex.vue'], resolve),
      meta: {
        auth: true,
        title: '主题应用'
      }
    },
    {
      path: '/clopedia/themeDetail',
      name: 'themeDetail',
      component: resolve => require(['../components/page/clopedia/service/theme/themeDetail.vue'], resolve),
      meta: {
        auth: true,
        title: '主题应用添加编辑'
      }
    },

      // h5手机上传
      // {
      //   path: '/mobile/fileCode.html',
      //   name: 'upload',
      //   component: resolve => require(['../components/page/h5_upload.vue'], resolve),
      // }

    ]
  },
  {
    path: '/login',
    name: '/login',
    component: resolve => require(['../components/page/Login.vue'], resolve)
  },
  // h5手机上传
  {
    path: '/mobile/fileCode.html',
    name: 'upload',
    component: resolve => require(['../components/page/h5_upload.vue'], resolve),
    // meta: {
    //   //auth: true,
    //   title: '流程管理'
    // }
  },
  {
    path: '/hello',
    name: '/hello',
    component: resolve => require(['../components/HelloWorld.vue'], resolve)
  }
  ]
})
